package com.cdc.http.http1;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by admin on 2018/3/24.
 */

public enum RequestExecutor {
    //枚举  全局单例
    INSTANCE;
    private ExecutorService mExecutorService;
    RequestExecutor(){
        mExecutorService= Executors.newSingleThreadExecutor();
    }

    public void execute(Request request, HttpListener httpListener){
        mExecutorService.execute(new RequestTask(request,httpListener));
    }



}
